//
// Created by masaikk on 2021/3/22.
//

#ifndef COLK_SOLUTION_H
#define COLK_SOLUTION_H

#define uint32_t int

class Solution {
public:
    int hammingWeight(uint32_t n) {
        int ret = 0;
        for (int i = 0; i < 32; i++) {
            if (n & (1 << i)) {
                ret++;
            }
        }
        return ret;
    }
};


#endif //COLK_SOLUTION_H
